home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech's Sprocket™ / SprocketGX / AppSpecific / GXDocWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-17  |  1.5 KB  |  69 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        GXWindow.h
  3.  
  4.     Contains:    The prototype GX window
  5.                 
  6.     Written by: Jon Summers
  7.     
  8.     Copyright:    © 1994 by Jon Summers, all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.      
  12.  */
  13.  
  14. #ifndef        _GXDocWindow_
  15. #define        _GXDocWindow_
  16.  
  17. #ifndef        _DOCWINDOW_
  18.     #include    "DocWindow.h"
  19. #endif
  20.  
  21. #ifndef    __QDGXHeaders__
  22.     #include    "QDGXHeaders.h"
  23. #endif
  24.  
  25. #define        kMaxPageFormats        20
  26.  
  27. class    TGXDocWindow    :    public TDocWindow
  28. {
  29. public:
  30.                     TGXDocWindow();
  31.     virtual         ~TGXDocWindow();
  32.  
  33.     virtual void     Draw(void);
  34.     virtual    void    Select(void);
  35.     virtual void        Activate(Boolean activating);
  36.     virtual    void    AdjustCursor(EventRecord* pEvent);
  37.     virtual void        SetupMenus(void);
  38.     virtual void        Click(EventRecord *pEvent);
  39.     virtual void        AdjustForNewWindowSize(Rect* pOldRect,Rect* pNewRect);
  40.     virtual  void     HandleMenuCommand(short theMenuID, short theMenuItem);
  41.  
  42.     void         CreateSampleImage(void);
  43.     OSErr         ReadPage(long  thePageNum);
  44.     void         GetContentRect(Rect* pRect);
  45.  
  46. #if    qUseQuickDrawGX
  47.         public:
  48.             gxShape     GetDocShape(void);
  49.             gxJob        GetDocJob(void);
  50.         protected:
  51.             void            ResetContentClip(void);
  52.             gxJob        fDocJob;
  53.             gxShape    fPage;
  54.             gxViewPort        fContentViewPort;
  55. #endif    // qUseQuickDrawGX
  56.         protected:
  57.             virtual  void     PageSetupDlg(Boolean theCustomFlag);
  58.             virtual  void     PrintDlg(Boolean theDialogFlag);
  59.             long  fDocPageNum;
  60.             long  fPagesInDoc;
  61.             gxFormat    fPageFormats[kMaxPageFormats];        // WE SHOULD BE DYNAMIC
  62. };
  63.  
  64. #if    qUseQuickDrawGX
  65.     extern GXPrintingEventUPP    gAppPrintingOverrideUPP;
  66. #endif    // qUseQuickDrawGX
  67.  
  68. #endif
  69.